<!DOCTYPE html>
<html>
<head>
	<link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.2.0/css/font-awesome.min.css" />
	<script src="js/jquery1.7.2.js"></script>
	<script src="js/Tdrag.js"></script>
	<script src="js/jquery.drag.js"></script>
	<script src="js/jquery.drop.js"></script>
	
	<style type="text/css">
		/**{
			font-size: 100px;
		}*/
		.div1{
			position: absolute;
			top: 0px;
			left: 0px;
			width: 100px;
			height: 100px;
			background: #ccc;
			z-index: 1;
		}
		.div2{
			position: absolute;
			top: 200px;
			left: 0px;
			width: 100px;
			height: 100px;
			background: #ccc;
			z-index: 1;
		}
		.div3{
			position: absolute;
			top: 400px;
			left: 0px;
			width: 100px;
			height: 100px;
			background: #ccc;
			z-index: 1;
		}
		.div4{
			position: absolute;
			top: 100px;
			right: 100px;
			width: 100px;
			height: 303px;
			border: 1px dashed;
			
		}
		.div5{
			height: 100px;
			border-bottom: 1px dashed;
		}
		.div6{
			height: 100px;
			border-bottom: 1px dashed;
		}
		.div7{
			height: 100px;
		}
	</style>
</head>
<body id="body">
<span id="hide" style="display: none;"></span>
<div class="div1"><i class="fa fa-camera-retro"></i></div>
<div class="div2"><i class="fa fa-spinner fa-spin"></i></div>
<div class="div3"><i class="fa fa-arrow-circle-o-down"></i></div>
<div class="div4">
	<div class="div5"></div>
	<div class="div6"></div>
	<div class="div7"></div>
</div>
</body>
<script type="text/javascript">
// $('.div5').mouseup(function(){
// 	alert(1);
// });

jQuery(function(){
	$('.div1, .div2, .div3').mouseenter(function(){
		$('#hide').html($(this).attr('class'));
	});
	$(".div1").drag();
	$(".div2").drag();
	$(".div3").drag();
	$('.div5').drop(function(){
		var cls = $('#hide').html();
		$('.' + cls).animate({
			top: $('.div5').offset().top+'px',
			left: $('.div5').offset().left+'px'
		});
	});
	$('.div6').drop(function(){
		var cls = $('#hide').html();
		$('.' + cls).animate({
			top: $('.div6').offset().top+'px',
			left: $('.div6').offset().left+'px'
		});
	});
	$('.div7').drop(function(){
		var cls = $('#hide').html();
		$('.' + cls).animate({
			top: $('.div7').offset().top+'px',
			left: $('.div7').offset().left+'px'
		});
	});
	
});
</script>
</html>